/** startup IBRPG code **/
/** using YUI loader **/

(function(){
    
    window.tryLoad = function(){
        try{
         if(YAHOO){
            //Add the module to YUILoader
            loader = new YAHOO.util.YUILoader();
            loader.addModule({
	           name: "ibrpg", //module name; must be unique
	           type: "js", //can be "js" or "css"
                fullpath: "http://www.ittybittyrpg.com/magenta/js/ibrpg_core.js", //can use a path instead, extending base path
                //varName: "JSON" // a variable that will be available when the script is loaded.  Needed
                // in order to act on the script immediately in Safari 2.x and below.
	           requires: ['yahoo', 'event', 'dom', 'animation','container','selector','json','layout','element','tabview'] //if this module had dependencies, we could define here
            }); 



	    loader.require("ibrpg"); 
	    loader.loadOptional = true; 
	    loader.onSuccess = function() {
            YAHOO.ibrpg.core.init();
            }

        loader.insert();
              
        } 
            
        }catch(ex){
            setTimeout('window.tryLoad()', 1000);
        }
        
    }
    window.tryLoad();
    


})();
